package com.chen.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chen.dto.DishDto;
import com.chen.entity.Dish;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface DishService extends IService<Dish> {
    //分页查询
    Page<DishDto> page1(int page, int pageSize, String name);

    //启用或禁用
    void up(long[] ids, int status);

    void up(List<Long> ids, int status);

    //新增
    @Transactional
    void saveDishAndFlavors(DishDto dishDto);

    //根据id查寻菜品数据
    DishDto findById(long id);

    //修改
    @Transactional
    void updates(DishDto dishDto);

    //删除
    @Transactional
    void delete(Long[] ids);

    //根据分来ID查询对应的菜品信息
    List<DishDto> getList(long categoryId,Integer status);


}
